<template>
  <div>
  	<!--start 头部-->
  	<div class="sreePublic">
  		<div id="" style="text-align: center;">
  			<em class="iconfont" @click="$router.go(-1)">&#xe61f;</em>
  		</div>
			{{vue_header_title}}
  	</div>
  	<!--start 头部-->
  	<!--start content-->
  	<div class="content">
  		<p>
  			<i class="iconfont">&#xe654;</i>支付方式
  		</p>
  		<p>
  			<span :class="{active:item.ddlistDefault=='1'}" @click="vFun_pay_select(item.ddlistDefault)" v-for="(item,index) in vue_pay_ddtypeList">{{item.ddlistName}}</span>
  		</p>
  		<p>
  			商品属性或所在地区不支持货到付款
  		</p>
  	</div>
  	<!--end content-->
  </div>
</template>

<script>
export default {
  data () {
    return {
    	vue_header_title:'选择支付方式',  //头部title
    	vue_pay_ddtypeList:[],  //支付方式
    }
  },
  methods:{
  	query_pay(ddtypeCode){  //获取支付方式
  		this.axios({
  			method:"POST",
  			url:"/v3/system/ddlists/"+ddtypeCode+"/listAll",
  			data:{}
  		}).then((res)=>{
  			this.vue_pay_ddtypeList=res.data.list;
  		})
  	},
  	vFun_pay_select(type){
  		if(type==='1'){
  			this.$router.push({path:'/saveOrder'});
  		}
  	}
  },
  activated(){
  	this.query_pay('00100000044');  //获取支付方式
  },
  created(){
  	this.query_pay('00100000044');  //获取支付方式
  },
  mounted(){
  	
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
	.inside_header{
		height:1.2rem;
	}
	.content{
		border-bottom:1px solid #bbb;
		margin-top:1.2rem;
		padding:0.58rem;
	}
	.content>p:nth-of-type(1){
		vertical-align:middle;
	}
	.content>p:nth-of-type(1)>i{
		vertical-align:middle;
		font-size:.8rem;
		color:#918C91;
		margin-right:8px;
	}
	.content>p:nth-of-type(2)>span{
		display:inline-block;
		width:2.13rem;
		height:.8rem;
		line-height:.8rem;
		color:#bbb;
		text-align:center;
		border:1px solid #bbb;
		background:#F0F0F2;
		border-radius:5px;
		margin-right:0.45rem;
	}
	.content>p:nth-of-type(2)>span.active{
		color:#d50b0a;
		border-color:#d50b0a;
		background:#fff;
	}
	.content>p:nth-of-type(3){
		margin-top:.3rem;
		color:#bbb;
	}
</style>
